package com.tiancheng.trade.settlement.mapper.settlement;

import com.tiancheng.trade.settlement.mapper.TYBaseMapper;
import com.tiancheng.trade.settlement.model.settlement.SSettleLettersDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * 收入明细
 * 此类为[代码工厂]自动生成，继承了JpaRepository类，已经拥有基本的增删改成操作
 * <其他请自行扩展>
 *
 * @time 2021-05-8 16:21
 * @GeneratedByCodeFactory
 */
@Repository
public interface SSettleLettersDetailMapper extends TYBaseMapper<SSettleLettersDetail> {
    @Update("update s_settle_letters_detail set adjust_count = adjust_count + #{adjustCount} where settle_letters_code=#{settleLettersCode} and sub_settle_letters_code = #{subSettleLettersCode}")
    int updateAdjustCount(@Param("settleLettersCode") String settleLettersCode,@Param("subSettleLettersCode") String subSettleLettersCode, @Param("adjustCount") Integer adjustCount);
}